using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;

namespace KBMVC.Controllers
{
    public class AccountController : Controller
    {

        public ActionResult Login()
        {
            return View();
        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Login( string username, string password )
        {
            if (username == "trey" && password == "1234")
            {
                ViewData["IsLoggedIn"] = true;
                return View();
            }
            else
            {
                ViewData["IsLoggedIn"] = false;
                ViewData["LoginFailure"] = true;
                return View();
            }
        }

    }
}
